<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>平移</title>
  <style>
    body {
        perspective: 1000px;
    }
    
    .box1 {
        width: 300px;
        height: 300px;
        margin: 200px auto;
        background-color: #bfa;
        box-shadow: 3px 3px 10px 5px lightgrey;
        transition: ease-in .1s;
    }
    .box1:hover {
        /* z-轴视觉效果, 配合百分比视口*/
        transform: translate3d(0px, 0px, 50px);
    }
  </style>
</head>
<body>
  <div class="box1"></div>
</body>
</html>